package org.ricks.common.db;

import java.sql.ResultSet;
import java.sql.SQLException;

/**
 * @author chenwei
 * @Title:
 * @Package
 * @Description:
 * @date 2020/12/2316:45
 */
public class ByteColumnHandler implements ColumnHandler {
    public ByteColumnHandler() {
    }

    public boolean match(Class<?> propType) {
        return propType.equals(Byte.TYPE) || propType.equals(Byte.class);
    }

    public Object apply(ResultSet rs, int columnIndex) throws SQLException {
        return rs.getByte(columnIndex);
    }
}

